From f4cc71445a36134d7a60889cb068a40357904445 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 10 May 2006 15:58:48 +0000 Subject: [PATCH] check that tab_label is not NULL before checking that it's notebook's 2006-05-10 Carlos Garnacho * gtk/gtknotebook.c: check that tab_label is not NULL before checking that it's notebook's child. Closes #341247. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gtk/gtknotebook.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cf5a7aa6e0..91bfdb55c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-10 Carlos Garnacho + + * gtk/gtknotebook.c: check that tab_label is not NULL before checking + that it's notebook's child. Closes #341247. + Wed May 10 15:57:53 2006 Tim Janik * applied unified patch for configurable scroll arrow sizes from diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index cf5a7aa6e0..91bfdb55c1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-05-10 Carlos Garnacho + + * gtk/gtknotebook.c: check that tab_label is not NULL before checking + that it's notebook's child. Closes #341247. + Wed May 10 15:57:53 2006 Tim Janik * applied unified patch for configurable scroll arrow sizes from diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 3c8c7d2830..7b336494e6 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -124,7 +124,7 @@ enum { #define PAGE_TOP_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y) #define PAGE_BOTTOM_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y + ((GtkNotebookPage *) (_page_))->allocation.height) #define PAGE_MIDDLE_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y + ((GtkNotebookPage *) (_page_))->allocation.height / 2) -#define NOTEBOOK_IS_TAB_LABEL_PARENT(_notebook_,_page_) (((GtkNotebookPage *) (_page_))->tab_label->parent == ((GtkWidget *) (_notebook_))) +#define NOTEBOOK_IS_TAB_LABEL_PARENT(_notebook_,_page_) ((_page_)->tab_label != NULL && ((GtkNotebookPage *) (_page_))->tab_label->parent == ((GtkWidget *) (_notebook_))) struct _GtkNotebookPage { -- 2.30.2